home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 8
/
QRZ Ham Radio Callsign Database - Volume 8.iso
/
pc
/
files
/
dsp
/
56000tar.z
/
56000tar
/
56000
/
fntns
/
bingray.asm
next >
Wrap
Assembly Source File
|
1991-11-26
|
602b
|
19 lines
;
; This program originally available on the Motorola DSP bulletin board.
; It is provided under a DISCLAMER OF WARRANTY available from
; Motorola DSP Operation, 6501 Wm. Cannon Drive W., Austin, Tx., 78735.
;
; Binary-to-Gray Code Conversion Macro
;
; Last Update 30 Mar 87 Version 1.0
;
bingray macro
bingray ident 1,0
;
; This macro converts a binary value in register A1 to a GRAY coded
; number in A1. Register X0 is used as a temporary register.
;
lsr a a1,x0 ;shift bits, copy a
eor x0,a ;xor adjacent bits to do gray code
endm